﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProjectBot.Controls;
using System.Drawing;

namespace ProjectBot.Managers
{
    public class CommandManager
    {
        private static CommandBox Parent;
        private static string[] Args;

        public static void Manage(CommandBox box, string[] args)
        {
            Parent = box;
            Args = args;
            if (args.Length > 0)
            {
                if (args[0].StartsWith("/"))
                {
                    // A console command
                    switch (args[0].Split('/').Last())
                    {
                        case "channel":
                            break;
                        default:
                            break;
                    }
                }
                // We have some data
                switch (args[0])
                {
                    case "test":
                        if(ProjectBotForm.IrcClient != null)
                        ProjectBotForm.IrcClient.SendChat("Test Command", ProjectBotForm.IrcChannel);
                        break;
                    default:
                        ProjectBotForm.WriteLine("No Known Command", Color.Red);
                        break;
                }
            }
        }
    }
}
